package com.heima.article.job;

import com.heima.article.service.HotArticleService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author JianKang
 * @create 2023-11-02 18:16
 */

@Component
@Slf4j
public class ComputeHotArticleJob {

    @Autowired
    HotArticleService hotArticleService;

    @XxlJob("computeHotArticleJob")
    public void handler() {
        log.info("热文章分值计算调度任务开始执行。。。。。");
        hotArticleService.computerHotArticle();
        log.info("热文章分值计算调度任务结束。。。。。");
    }
}
